// 下载
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
// 安装
yum install -y postgresql15-server
// 初始化数据库
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
// 设置开机启动
sudo systemctl enable postgresql-15

